﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using BoCaiWeb.Business;
using BoCaiWeb.Model;
using BoCaiWeb.WebSite.Code;
using Ajeelee.Core.Utils;

namespace BoCaiWeb.WebSite
{
    public partial class index : PageBase
    {
        Hashtable table = new Hashtable();
        protected LanMuInfo lanMuInfo = new LanMuInfo();                        //关于博才
        protected IList<Job> jobList = new List<Job>();                         //猎头岗位
        protected IList<News> newList3 = new List<News>();                      //公司新闻
        protected IList<News> newList4 = new List<News>();                      //行业动态
        protected IList<Links> linksList = new List<Links>();                   //友情链接
        IJobBusiness jobBll = new JobBusinessFactory().CreateJobBusiness();
        INewsBusiness newsBll = new NewsBusinessFactory().CreateNewsBusiness();
        ILanMuInfoBusiness lanMuInfoBll = new LanMuInfoBusinessFactory().CreateLanMuInfoBusiness();
        ILinksBusiness linksBll = new LinksBusinessFactory().CreateLinksBusiness();

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //关于博才
                lanMuInfo = lanMuInfoBll.GetById(5);

                //猎头岗位
                table.Clear();
                table.Add(JobHash.TopNum, 4);
                jobList = jobBll.GetAllJob(table);

                //公司新闻
                table.Clear();
                table.Add(NewsHash.TopNum, 4);
                table.Add(NewsHash.CId, 3);
                newList3 = newsBll.GetAllNews(table);

                //行业动态
                table.Clear();
                table.Add(NewsHash.TopNum, 4);
                table.Add(NewsHash.CId, 4);
                newList4 = newsBll.GetAllNews(table);

                //友情链接
                linksList = Utility.GetLinks();
            }
            catch (Exception ex)
            {
                Function.WriteErrorLog(ex);
            }
        }
    }
}